/*
 * @Author: Jimmy
 * @LastModifiedBy: Jimmy
 * @Date: 2024-05-25 17:31:22
 * @LastEditTime: 2024-05-25 19:27:27
 * @FilePath: /nest_study/src/modules/system/post/entities/post.entity.ts
 */
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';
import { BaseEntity } from 'src/common/entites/base';

@Entity('sys_post', {
  comment: '岗位信息表',
})

export class SystemPostEntity extends BaseEntity {
  @ApiProperty({ type: String, description: '岗位ID' })
  @PrimaryGeneratedColumn({ type: 'int', name: 'post_id', comment: '岗位ID' })
  public id: number;

  @Column({ type: 'varchar', name: 'post_code', length: 64, comment: '岗位编码' })
  public code: string;

  @Column({ type: 'varchar', name: 'post_name', length: 50, comment: '岗位名称' })
  public name: string;

  @Column({ type: 'int', name: 'post_sort', default: 0, comment: '显示顺序' })
  public sort: number;
}